<!DOCTYPE html>
<#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
<html>
<head>
  <meta charset="utf-8">
  <title>化学物理电源基本信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
  <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
  <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
  <script type="text/javascript">
    var __ctx = "${ctx}";
  </script>
  <#if isClose == 'true'>
    <style>
      .listBody .qbdms-bodyDiv{padding: 0 }
      body.qbdms-particulars .qbdms-bodyDiv div.layui-table-view-body{padding: 16px}
      .btnformItem{background: none}
    </style>
  </#if>
</head>
<body class="listBody qbdms-particulars">

<div class="qbdms-bodyDiv">
  <div class="layui-table-view-body qbdms-add-view-body" >
    <#if isClose != 'true'><div class="qbdms-formTitle" >化学物理电源信息 <i class="qbdms-returnOn closeWindow">返回</i></div></#if>
    <form class="formPreview layui-form" requrl="${ctx}/qbdms/wQbdChemicalPhysicsInfo/get" lay-filter="wQbdChemicalPhysicsInfoDataForm">
      <input type="hidden" name="id" placeholder="请输入" autocomplete="off" class="layui-input "
             maxlength="50" fieldname="id">

      <div class="" style="width: 100%;overflow-x: auto">
        <table class="tableExcel qbdms-zeroTable" width="100%" border="0" cellspacing="0" cellpadding="0">
          <tbody>
          <tr id="tbxx">
          </tr>

          <tr>
            <td class="qbdms-zeroTable-lable">检测日期<span style="color: red;">*</span></td>
            <td name='monitoringTime'></td>
            <input type="hidden" placeholder="请输入" autocomplete="off"
                   class="layui-input dateTimeFiled" lay-verify="required" name="monitoringTime"
                   lay-reqtext="检测日期是必填项">
            <td class="qbdms-zeroTable-lable">密级<span style="color: red;">*</span></td>
            <td name=''>
              <@secSelect.sec_select data_src=1 required=true name="secret"/>
            </td>
            <td class="qbdms-zeroTable-lable">种类<span style="color: red;">*</span></td>
            <td name='type'></td>
          </tr>
          <tr>
            <td class="qbdms-zeroTable-lable">所属产品类别<span style="color: red;">*</span></td>
            <td name=''>
              <select id="productCategory" name="productCategory" autocomplete="off"
                      class="layui-input" lay-filter="productCategory"
                      fieldname="productCategory" lay-verify="required"
                      lay-reqtext="所属产品类别是必填项"></select>
            </td>
            <td class="qbdms-zeroTable-lable">产品名称<span style="color: red;">*</span></td>
            <td name=''>
              <select id="productName" name="productName" autocomplete="off"
                      class="layui-input"
                      maxlength="50" fieldname="productName" lay-verify="required"
                      lay-reqtext="产品名称是必填项">
              </select>
            </td>
            <td class="qbdms-zeroTable-lable">产品代号</td>
            <td name='productCode'></td>
          </tr>
          <tr>
            <td class="qbdms-zeroTable-lable">批次号</td>
            <td name='batchNumber'></td>
            <td class="qbdms-zeroTable-lable">所处阶段</td>
            <td name=''>
              <@dicSelect.dic name="atTheStage"  css="layui-input filter-value"  nodeKey="scjd" id="atTheStage"/>
            </td>
            <td class="qbdms-zeroTable-lable">交付数量</td>
            <td name='deliveryQuantity'></td>
          </tr>
          <tr>
            <td class="qbdms-zeroTable-lable">本批是否合格</td>
            <td name=''>
              <@dicSelect.dic name="isQualified" css="layui-input filter-value" nodeKey="sfhg" id="isQualified"/>
            </td>
            <td class="qbdms-zeroTable-lable">问题原因</td>
            <td name=''>
              <@dicSelect.dic name="problemCauses" css="layui-input filter-value" nodeKey="wtyy" id="problemCauses"/>
            </td>
            <td class="qbdms-zeroTable-lable">出问题产品数量（只/组/台/套）</td>
            <td name='defectiveProductsNumber'></td>
          </tr>
          <tr>
            <td class="qbdms-zeroTable-lable">阶段</td>
            <td name=''>
              <select id="stage" name="stage" autocomplete="off"
                      class="layui-input"
                      maxlength="50" fieldname="stage"></select>
            </td>
            <td class="qbdms-zeroTable-lable">外协单位</td>
            <td name='outsourcingUnit'></td>
            <td class="qbdms-zeroTable-lable">不满足技术指标</td>
            <td name=''>
              <@dicSelect.dic name="notMeetSpecifications"  css="layui-input filter-value"  nodeKey="bmzjszb" id="notMeetSpecifications"/>
            </td>
          </tr>

          </tbody>
        </table>

      </div>

      <#if isClose != 'true'>
        <div class="layui-form-item btnformItem">
          <p>
            <button type="reset" id="closeWindow"
                    class="closeWindow layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">返回
            </button>
          </p>
        </div>
      </#if>
      <div class="layui-hide">
        <input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input "
               maxlength="50" fieldname="id">
        <input type="text" name="fillman" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="fillman">
        <input type="text" name="fillmanaccount" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="fillmanaccount">
        <input type="text" name="filldept" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="filldept">
        <input type="text" name="filldeptid" placeholder="请输入填写部门id"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="filldeptid">
        <input type="text" name="filldepthospital" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="filldepthospital">
        <input type="text" name="filldepthospitalid" placeholder="请输入二级部门id"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="filldepthospitalid">
        <input type="text" name="filldate" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="filldate">
        <input type="text" name="fMainunitid" placeholder="请输入主承担单位ID"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="fMainunitid">
        <input type="text" name="createTime" placeholder="请输入"
               autocomplete="off" class="layui-input" maxlength="50"
               fieldname="createTime">
        <input type="text" name="createBy" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="createBy">
        <input type="text" name="updateTime" placeholder="请输入"
               autocomplete="off" class="layui-input dateTimeFiled time-init" maxlength="50"
               fieldname="updateTime">
        <input type="text" name="updateBy" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="updateBy">
        <input type="text" name="tenantId" placeholder="请输入租户Id"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="tenantId">
        <input type="text" name="reportStatusTemp" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="reportStatusTemp">
        <input type="text" name="reportStatus" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="reportStatus">
        <input type="text" name="reportDate" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="reportDate">
        <input type="text" name="reportReason" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="reportReason">
        <input type="text" name="returnmsg" placeholder="请输入"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="returnmsg">
        <input type="text" name="fTechnology" placeholder="组织负责人code"
               autocomplete="off" class="layui-input " maxlength="50" fieldname="returnmsg">
      </div>
    </form>
  </div>
</div>

<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>

  layui.config({
    base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
  }).extend({
    index: 'lib/index'  //主入口模块
  }).use(['index', 'common', 'laydate','propsHandle', 'jquery',  'qbdmsForm'],
      function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var form = layui.form;
        var common = layui.common;
        var propsHandle = layui.propsHandle;
          var  defProps = {
                  //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                  viewMould: 'moulds/', // 组件模块 存放文件 *****
                  formAreaInfo: '.formPreview',
                  formAreaInfo: 'html',
                  temDate: '.temDate',
                  uploadFileBtn: '.uploadFileBtn',
                  uploadImgBtn: '.uploadImgBtn',
                  richTextArea: '.richTextArea',
                  selectInput: '.selectInput',
                  radioOptionCont: '.radioOptionCont',
                  dataLexiTree: '.dataLexiTree',
                  selectorBtn: '.selectorBtn'
              },
              temQuery = new propsHandle();  // 实例化模板功能部分

          // 初始化模板功能
          temQuery.initTem({
              selectorBtn: defProps.selectorBtn,
              selectorTemPath: setter.views + defProps.viewMould
          });
        var productCategoryList = eval('${productCategoryList}'); //所属产品类别
        common.initDicData("productCategory", productCategoryList)
        var stageList = eval('${stageList}'); //阶段
        common.initDicData("stage", stageList)
        var productNameList = eval('${productNameList}'); //产品名称
        if (null != productNameList && "" != productNameList) {
          common.initDicData("productName", productNameList)
        }
        var type = "${type}";
        if (null != type && "" != type) {
          $('#type').val(type);
        }
        form.on('select(productCategory)', function (data) {
          $.ajax({
            url: "${ctx}/qbdms/wQbdChemicalPhysicsInfo/getSelectData",
            type: "post",
            data: {
              "typeValue": type,
              "productCategoryValue": data.value,
            },
            dataType: 'json',
            success: function (data) {

              $("#productName").empty();
              common.initDicData("productName", data)
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
              layer.alert(data.msg);
              //执行重载
              reflashQuery(true);
              dateReflash();
            }
          })
        });
        var dateTimeFiledLen = $(".dateTimeFiled");
        for (var i = 0; i < dateTimeFiledLen.length; i++) {
          laydate.render({
            elem: dateTimeFiledLen[i] //指定元素
            , type: 'date'
            , trigger: 'click'
          });
        }


        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
          if ("${isClose}" == "true") {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
          }
          window.location.href = '${ctx}/qbdms/wQbdChemicalPhysicsInfo/view/list';
        });

        var runId = "${runId}";
        if (runId == null || runId == '') {
          $("#hideAndShow").show();
        }

        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
          name: 'wQbdChemicalPhysicsInfoDataForm',
          idValue: "${id}",
          primary: "id",
          getCallback: function (data) {
            // $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span>" +
            //     "<span class='qbdms-TBinformationText'>【"+data.data.filldept+"   | "+data.data.fillman+"  | "+data.data.filldate+"】</span>");
            $("#tbxx").html("<td class='qbdms-zeroTable-lable'>填报信息:</td><td colspan='5' class=''>【"+data.data.filldept+" | "
                    +data.data.fillman+"  | "+data.data.filldate+"】</td>");
          }
        });
        $("body *").not("#closeWindow").attr("disabled","disabled");
      });
</script>
</body>
</html>